package xuegao.study.mall.web.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import xuegao.study.mall.common.model.ums.UmsMember;
import xuegao.study.mall.common.model.ums.UmsMemberLevel;

@FeignClient(name = "study-rbac-service", path = "/rbac/open/api")
public interface RbacServiceClient {

    @GetMapping("/loadUmsMemberByUserName")
    UmsMember loadUmsMemberByUserName(@RequestParam("username") String username);

    @PostMapping("/registerUmsMember")
    void registerUmsMember(@RequestBody UmsMember umsMember);

    @GetMapping("/loadDefaultUmsMemberLevel")
    UmsMemberLevel loadDefaultUmsMemberLevel();
}
